// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
// import filters from './filters'
import jsppui from '@/libs/jsppui'

Vue.config.productionTip = false

// 全局过滤器
Vue.filter('replaceNumToChs',function(value) {
  return value.replace(/\d+/g, (node,key) => {
    // console.log(node,value);
    return numReplace(node)
  })
  function numReplace(num){
    switch(num){
      case '1':
        return '一'
      case '2':
        return '二'
      case '3':
        return '三'
      case '4':
        return '四'
    }
  }
})


Vue.mixin(jsppui);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
